<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // var arrs=["alice","baby","cici","alice","baby","lili"];
        // var newArr=[];
        // for(var i=0;i<arrs.length;i++){
        //     if(newArr.indexOf(arrs[i])==-1){
        //         newArr.push(arrs[i]);
        //     }
        // }
        // console.log(newArr);

        function unqiue(arrs){
            var newArr=[];
            for(var i=0;i<arrs.length;i++){
                if(newArr.indexOf(arrs[i])==-1){
                    newArr.push(arrs[i]);
                }
            }
            return newArr;
        }
        var arrays=[78,29,301,301,78,23,23];
        console.log(unqiue(arrays));
    </script>
</head>
<body>
    
</body>
</html>